﻿@using WebShop.Infrastructure

@model WebShop.ViewModels.ProductsInCart

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

@using (Html.BeginForm("Create", "ProductsCart", FormMethod.Post))
{
    @Html.AntiForgeryToken()
    
    if (Model.Products.Count > 0)
    {
        @Html.Partial("_ProductsInOrder", Model)
        <p>
            <input type="submit" value="Create Order" />
        </p>
    }
    else
    {
        <p>You have empty cart</p>
    }
}